home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 15 / CU Amiga Magazine's Super CD-ROM 15 (1997)(EMAP Images)(GB)[!][issue 1997-10].iso / CUCD / Graphics / Ghostscript / source / unixtail.mak < prev    next >
Encoding:
Text File  |  1997-04-14  |  5.6 KB  |  145 lines

  1. #    Copyright (C) 1990, 1995, 1996, 1997 Aladdin Enterprises.  All rights reserved.
  2. # This file is part of Aladdin Ghostscript.
  3. # Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND.  No author
  4. # or distributor accepts any responsibility for the consequences of using it,
  5. # or for whether it serves any particular purpose or works at all, unless he
  6. # or she says so in writing.  Refer to the Aladdin Ghostscript Free Public
  7. # License (the "License") for full details.
  8. # Every copy of Aladdin Ghostscript must include a copy of the License,
  9. # normally in a plain ASCII text file named PUBLIC.  The License grants you
  10. # the right to copy, modify and redistribute Aladdin Ghostscript, but only
  11. # under certain conditions described in the License.  Among other things, the
  12. # License requires that the copyright notice and this notice be preserved on
  13. # all copies.
  14.  
  15. # Partial makefile common to all Unix configurations.
  16.  
  17. # This is the last part of the makefile for Unix configurations.
  18. # Since Unix make doesn't have an 'include' facility, we concatenate
  19. # the various parts of the makefile together by brute force (in tar_cat).
  20.  
  21. # Define the name of this makefile.
  22. UNIXTAIL_MAK=unixtail.mak
  23.  
  24. # The following prevents GNU make from constructing argument lists that
  25. # include all environment variables, which can easily be longer than
  26. # brain-damaged system V allows.
  27.  
  28. .NOEXPORT:
  29.  
  30. # -------------------------------- Library -------------------------------- #
  31.  
  32. ## The Unix platforms
  33.  
  34. # We have to include a test for the existence of sys/time.h,
  35. # because some System V platforms don't have it.
  36.  
  37. # Define pipes as a separable feature.
  38.  
  39. pipe_=gdevpipe.$(OBJ)
  40. pipe.dev: $(UNIXTAIL_MAK) $(ECHOGS_XE) $(pipe_)
  41.     $(SETMOD) pipe $(pipe_)
  42.     $(ADDMOD) pipe -iodev pipe
  43.  
  44. gdevpipe.$(OBJ): gdevpipe.c $(AK) $(errno__h) $(stdio__h) $(string__h) \
  45.   $(gserror_h) $(gsmemory_h) $(gstypes_h) $(gxiodev_h) $(stream_h)
  46.  
  47. # Unix platforms other than System V, and also System V Release 4
  48. # (SVR4) platforms.
  49. unix__=gp_nofb.$(OBJ) gp_unix.$(OBJ) gp_unifs.$(OBJ) gp_unifn.$(OBJ)
  50. unix_.dev: $(unix__)
  51.     $(SETMOD) unix_ $(unix__)
  52.  
  53. gp_unix.$(OBJ): gp_unix.c $(AK) $(string__h) $(gx_h) $(gsexit_h) $(gp_h) \
  54.   $(time__h)
  55.  
  56. # System V platforms other than SVR4, which lack some system calls,
  57. # but have pipes.
  58. sysv__=gp_nofb.$(OBJ) gp_unix.$(OBJ) gp_unifs.$(OBJ) gp_unifn.$(OBJ) gp_sysv.$(OBJ)
  59. sysv_.dev: $(sysv__)
  60.     $(SETMOD) sysv_ $(sysv__)
  61.  
  62. gp_sysv.$(OBJ): gp_sysv.c $(stdio__h) $(time__h) $(AK)
  63.  
  64. # -------------------------- Auxiliary programs --------------------------- #
  65.  
  66. $(ANSI2KNR_XE): ansi2knr.c
  67.     $(CCA2K) $(O)$(ANSI2KNR_XE) ansi2knr.c
  68.  
  69. $(ECHOGS_XE): echogs.c $(AK)
  70.     $(CCAUX) $(O)$(ECHOGS_XE) echogs.c
  71.  
  72. # On the RS/6000 (at least), compiling genarch.c with gcc with -O
  73. # produces a buggy executable.
  74. $(GENARCH_XE): genarch.c $(AK) $(stdpre_h)
  75.     $(CCAUX) $(O)$(GENARCH_XE) genarch.c
  76.  
  77. $(GENCONF_XE): genconf.c $(AK) $(stdpre_h)
  78.     $(CCAUX) $(O)$(GENCONF_XE) genconf.c
  79.  
  80. $(GENINIT_XE): geninit.c $(AK) $(stdio__h) $(string__h)
  81.     $(CCAUX) $(O)$(GENINIT_XE) geninit.c
  82.  
  83. # Query the environment to construct gconfig_.h.
  84. # The "else true; is required because Ultrix's implementation of sh -e
  85. # terminates execution of a command if any error occurs, even if the command
  86. # traps the error with ||.
  87. INCLUDE=/usr/include
  88. gconfig_.h: $(UNIXTAIL_MAK) $(ECHOGS_XE)
  89.     ./echogs -w gconfig_.h -x 2f2a -s This file was generated automatically. -s -x 2a2f
  90.     if ( test -f $(INCLUDE)/dirent.h ); then ./echogs -a gconfig_.h -x 23 define HAVE_DIRENT_H; else true; fi
  91.     if ( test -f $(INCLUDE)/ndir.h ); then ./echogs -a gconfig_.h -x 23 define HAVE_NDIR_H; else true; fi
  92.     if ( test -f $(INCLUDE)/sys/dir.h ); then ./echogs -a gconfig_.h -x 23 define HAVE_SYS_DIR_H; else true; fi
  93.     if ( test -f $(INCLUDE)/sys/ndir.h ); then ./echogs -a gconfig_.h -x 23 define HAVE_SYS_NDIR_H; else true; fi
  94.     if ( test -f $(INCLUDE)/sys/time.h ); then ./echogs -a gconfig_.h -x 23 define HAVE_SYS_TIME_H; else true; fi
  95.     if ( test -f $(INCLUDE)/sys/times.h ); then ./echogs -a gconfig_.h -x 23 define HAVE_SYS_TIMES_H; else true; fi
  96.  
  97. # ----------------------------- Main program ------------------------------ #
  98.  
  99. ### Library files and archive
  100.  
  101. LIB_ARCHIVE_ALL=$(LIB_ALL) $(DEVS_ALL)\
  102.  gsnogc.$(OBJ) gconfig.$(OBJ) gscdefs.$(OBJ)
  103.  
  104. # Build an archive for the library only.
  105. # This is not used in a standard build.
  106. GSLIB_A=$(GS)lib.a
  107. $(GSLIB_A): $(LIB_ARCHIVE_ALL)
  108.     rm -f $(GSLIB_A)
  109.     $(AR) $(ARFLAGS) $(GSLIB_A) $(LIB_ARCHIVE_ALL)
  110.     $(RANLIB) $(GSLIB_A)
  111.  
  112. ### Interpreter main program
  113.  
  114. INT_ARCHIVE_ALL=imainarg.$(OBJ) imain.$(OBJ) $(INT_ALL) $(DEVS_ALL)\
  115.  gconfig.$(OBJ) gscdefs.$(OBJ)
  116. XE_ALL=gs.$(OBJ) $(INT_ARCHIVE_ALL)
  117.  
  118. # Build a library archive for the entire interpreter.
  119. # This is not used in a standard build.
  120. GS_A=$(GS).a
  121. $(GS_A): $(INT_ARCHIVE_ALL)
  122.     rm -f $(GS_A)
  123.     $(AR) $(ARFLAGS) $(GS_A) $(INT_ARCHIVE_ALL)
  124.     $(RANLIB) $(GS_A)
  125.  
  126. # Here is the final link step.  The stuff with LD_RUN_PATH is for SVR4
  127. # systems with dynamic library loading; I believe it's harmless elsewhere.
  128. # The resetting of the environment variables to empty strings is for SCO Unix,
  129. # which has limited environment space.
  130. $(GS_XE): ld.tr echogs $(XE_ALL)
  131.     ./echogs -w ldt.tr -n - $(CCLD) $(LDFLAGS) $(XLIBDIRS) -o $(GS_XE)
  132.     ./echogs -a ldt.tr -n -s gs.$(OBJ) -s
  133.     cat ld.tr >>ldt.tr
  134.     ./echogs -a ldt.tr -s - $(EXTRALIBS) -lm
  135.     LD_RUN_PATH=$(XLIBDIR); export LD_RUN_PATH; \
  136.     XCFLAGS= XINCLUDE= XLDFLAGS= XLIBDIRS= XLIBS= \
  137.     FEATURE_DEVS= DEVICE_DEVS= DEVICE_DEVS1= DEVICE_DEVS2= DEVICE_DEVS3= \
  138.     DEVICE_DEVS4= DEVICE_DEVS5= DEVICE_DEVS6= DEVICE_DEVS7= DEVICE_DEVS8= \
  139.     DEVICE_DEVS9= DEVICE_DEVS10= DEVICE_DEVS11= DEVICE_DEVS12= \
  140.     DEVICE_DEVS13= DEVICE_DEVS14= DEVICE_DEVS15= \
  141.     $(SH) <ldt.tr
  142.